<!-- The documentation for the automaton editor. -->

<HTML><HEAD>
<TITLE>The Automaton Editor</TITLE>
</HEAD><BODY>

<H1>The Automaton Editor</H1>

<CENTER><IMG SRC="images/automaton.png" ALT="View Showing the Automaton Editor" WIDTH="303" HEIGHT="265" BORDER="1"><BR>Editing a finite automaton.</CENTER>

<H2>The Editor Pane</H2>

<P>The editor pane has two main components.  On the top is a detachable tool bar (the section with the four iconic buttons), and on the bottom is the canvas where the automaton is drawn.</P>

<P>The automaton is edited through clicks on the canvas.  The current action taken in response to those clicks depends on the currently selected tool.  Notice in the picture that the first button, the one with the mouse cursor, is selected: this indicates that it is selected.</P>

<P>To select another tool, click on it, or use its shortcut key.  You can get the shortcut key, as well as a short description of the tool, by holding the cursor over the tool button.  After a short time this should display a tool-tip with information.</P>

<P>The descriptions for those tools are shown below.</P>

<H2>The Tools</H2>

<DL>
<DT><IMG SRC="../ICON/state.gif"> The State Tool (the "S" key)</DT>
<DD>While the state tool is selected, a click on the canvas will create a new state centered at the point that was clicked.</DD>

<DT><IMG SRC="../ICON/transition.gif"> The Transition Tool (the "T" key)</DT>
<DD>By dragging from one state to another, a transition from the first state clicked to the second state dragged to will be created.  Looping transitions from a state to itself are handled no differently.  Once two states are joined with the tool, the user will then be asked for certain parameters of the transitions.</DD>

<DT><IMG SRC="../ICON/delete.gif"> The Delete Tool (the "D" key)</DT>
<DD>This will erase any transition or state it is clicked on.  If a state is deleted, those transitions incident on or emanating from a state will be deleted as well.</DD>

<DT><IMG SRC="../ICON/arrow.gif"> The Attribute Tool (the "A" key)</DT>
<DD>This tool is used to modify existing states and transitions.  To move states, drag them with this tool.  Dragging transitions will move transitions.  Clicking on a transition edits a transition.  A user may right-click (control click on Macs that have only one mouse button) on a state to bring up a pop-up menu to define the state as final, to define the state as initial, to set its label (an auxiliary description for a state), to clear its label (if it has one), or to clear all labels of all states.<P>

Right-clicking in a blank portion of the canvas will bring up a different pop-up menu.  One option of this menu is to hide or show labels; if labels are hiden, the user may hold the mouse cursor over a state to bring up a tool-tip with the label for that state.  The other option is the graph layout algorithm, which will rearrange the states of the automaton.  As a nota bene, this popup menu is available in all views with an automaton; however, as one might expect the user may use the graph layout algorithm only where JFLAP allows the moving of states.
</DD>
</DL>

<H2>Editing Transitions</H2>

<P>Only one transition may be edited at a time.  While a transition is being edited, fields appear that allow the user to change parameters regarding that particular transition.  Each field corresponds to a particular parameter of that transition.  In order to find out which is which during runtime, hold the mouse cursor over one of the fields; a tool tip will pop up to tell what it is.</P>

<P>Note that separate transitions must be placed in separate transitions; for example, in a FA, the three separate transitions <VAR>a</VAR>, <VAR>c</VAR>, and <VAR>d</VAR> <STRONG>cannot</STRONG> be abbreviated as the single transition <VAR>a, c, d</VAR>.</P>

<CENTER><IMG SRC="images/turing-transition-edit.png" ALT="" WIDTH="257" HEIGHT="168" BORDER="1"><BR>Editing a Turing machine transition.</CENTER>

<P>A finite automaton's transition editor will have a single field representing what characters are read from the input.  A pushdown automaton's transition editor will have three fields, the first to define what characters to read from input, the second to define what characters to pop from the stack, and the third to define what characters to push.  A Turing machine's transition editor will also have three fields, one for the read character, one for the write character, and one for the direction to move the tape head (L, S, and R for left, stay, and right).  To select the direction, click on the direction field and select from the menu or type shift-L, shift-S, or shift-R when the direction field is selected.  A multi-tape Turing machine is similar, but it has as many rows as tapes; each row follows the convention of Turing machine transitions defined previously.  To enter lambda entries for FAs and PDAs, simply leave a field blank.  Leaving a field blank in a Turing machine is not lambda, but is the blank tape symbol (represented as a square).</P>

<P>To stop editing, take some other action with the tool, or click in an empty space on the canvas, or press return/enter.  To cancel the editing of a transition and to revert that transition to its state before the edit, press escape.  If there is anything irregular about the transition entered, the program will display an error and revert the transition to its state before the edit.  Currently, the only restriction on transitions are on transitions for Turing machine: a Turing machine transition must read exactly one character and write exactly one character per tape.  If the read or write fields for a Turing machine are left empty, the blank tape alphabet symbol is assumed to be the content of that field.  Pressing shift-return/enter will stop editing the transition, and begin the process of editing a new one between the start and end states of the transition that we just stopped editing.</P>

<H2>In Haiku</H2>

<P>In the editor,<BR>
The canvas dominates all,<BR>
The tool-bar's on top.</P>

<P>Choose a different tool.<BR>
Your clicks upon the canvas<BR>
now serve different ends.</P>

<P><IMG SRC="../ICON/state.gif">
Clicks on the canvas<BR>
make new automaton states<BR>
when this tool's active.</P>

<P><IMG SRC="../ICON/transition.gif">
This creates transitions.<BR>
From one state to another<BR>
one may drag the mouse.</P>

<P>A table pops up<BR>
to define the transition.<BR>
When done, press return.</P>

<P>If in editing<BR>
mistakes are made in entry<BR>
escape will cancel.</P>

<P><IMG SRC="../ICON/delete.gif">
State or transitions<BR>
are removed from the canvas<BR>
through use of this tool.</P>

<P><IMG SRC="../ICON/arrow.gif">
This changes attributes.<BR>
A click edits transitions,<BR>
dragging states moves states.</P>

<P>Right click on a state.<BR>
A menu lets you make it<BR>
final or initial.</P>

<P>To switch tools quickly<BR>
without much mousing about<BR>
use the shortcut keys.</P>

<P>Tools each have tool-tips.<BR>
Mouse over a tool to see it.<BR>
The shortcut's shown there.</P>

<P>When you are finished,<BR>
to apply an operation,<BR>
choose from the menu.</P>

</BODY></HTML>
